package com.ruoyi.service.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.service.api.factory.RemoteServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @ClassName RemoteOrderService
 * @Description TODO
 * @Author yun
 * @Date 2025年01月02日 11:13
 * @Version 1.0
 */
@FeignClient(contextId = "remoteServiceService", value = ServiceNameConstants.SERVICE_SERVICE, fallbackFactory = RemoteServiceFallbackFactory.class)
public interface RemoteServiceService {

    @GetMapping(value = "/service/{id}")
    AjaxResult getInfo(@PathVariable("id") Long id,@RequestHeader(SecurityConstants.INNER) String source);

    @GetMapping(value = "/service/list/{ids}")
    AjaxResult getInfo(@PathVariable("ids") Long[] id,@RequestHeader(SecurityConstants.AUTHORIZATION_HEADER) String source);

}
